#include <cstdio>
#include <cstring>


int main () {
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
	char l[1000];
	char z[100][100];
	int n, i, j, q, p, w=0;
	
	while(gets(l)){
		n=strlen(l);
		w=p=0;
		while(p<n){
			sscanf(l+p,"%s",z[w]);
			p+=strlen(z[w])+1;
			w++;
		}
		j=13;
		if(z[w-1][0]=='F')j=12;
		for(i=1;i<w-j;++i){
			printf("%s ", z[i]);
		}
		printf("\t");
		for(;i<w;++i){
			printf("%s\t", z[i]);
		}
		printf("\n");
		
	}
	return 0;
}
